home *** CD-ROM | disk | FTP | other *** search
- ** File: TPSht_09.hlp
- ** Index: 48
-
- ** More Sheet View Help
- :: Non-linear Curve Fitting
- :: Model Equation
-
-
- █ Nonlinear curve fitting
-
- The nonlinear curve fitting (or
- nonlinear parameter estimation) feature
- of TechPlot gives the user the ability to
- develop models from experimental data.
- TechPlot offers a built-in script language,
- model equation editor, and a model
- equation parser. In this section, we
- describe how to use them.
-
-
- █ Editing a model equation file
-
- The model equation files used for
- nonlinear curve fitting in TechPlot are
- ASCII text files with certain conventions.
- These files can be saved to disk. The
- suggested filename extension is "*.EQN",
- but you can use any name you want. The
- model equation files can be edited by the
- equation editor in TechPlot or any other
- text editor. All information required
- for a nonlinear curve fitting is entered
- in the edit window in the Fitting dialog
- box. To invoke this dialog box, choose
- the User Defined fitting command from
- the Math Menu in Sheet View.
-
- The following is a sample of a complete
- model equation file:
-
- //TechPlot Model equation
- //
- [INDVAR]: TIME
- [DEPVAR]: CONCENTRAT
- [PARAMS]: A1, A2, K1, K2
- [EQUATIONS]:
- // T1 and T2 are intermediate variables
- T1=A1*EXP(-K1*TIME)
- T2=A2*EXP(-K2*TIME)
- CONCENTRAT=T1+T2
-
- [INIT PARAMS]:
- // initial estimates of parameters
- A1=1
- A2=2
- K1=0.1
- K2=0.2
-
- ENDMODEL
-
- There are five key fields in this
- window: independent variable(s), dependent
- variable(s), parameter(s), equation(s), and
- initial parameter value(s). All these
- fields are filled by a model template at
- the time when the User Fitting dialog box
- is shown. You can simply modify the
- variable names, equations and initial
- values to suit your needs. Please do not
- modify or delete the key words that are
- enclosed in square brackets.
-
- Comments are placed in the model file
- by preceding them with a double back slash,
- i.e. '//'. You can also use them to
- comment out equations instead of deleting
- them.
-
- All variables used in model equations
- that are not declared as dependent
- variables are considered as intermediate
- variable. The intermediate variables are
- often used to simplify complex model
- equations. For example, instead of
- writing
-
- y=sin(x+2*cos(x))
- -a*exp(x+2*cos(x))/(1+sqr(x+2*cos(x)))
-
- you can write
-
- w=x+2*cos(x)
-
- y=sin(w)-a*exp(w)/(1+sqr(w))
-
- Based on the model template, you can
- simply modify it to create the model you
- want.
-
-
- █ Compiling model
-
- To compile a model, choose the Compile
- command in the Fitting dialog box.
-
-
- █ Choosing fitting method
-
- The nonlinear curve fitting techniques
- used in TechPlot are the least-square
- minimization techniques with three popular
- kernel iteration algorithms.
-
-